import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/layou' },
    {
      path: '/layou', component: () => import('@/views/Layou.vue')
      , meta: { title: "首页" }, name: "layou",

      redirect: { path: '/system' },
      children: [
        {
          path: '/system', component: () => import('@/views/System/System.vue'),
          meta: { title: "系统管理" }, name: "system",
          redirect: { path: '/department' },
          children: [
            {
              path: '/department', component: () => import('@/views/System/department.vue')
              , meta: { title: "部门管理" }, name: "department",
            }
          ]
        },
      ]
    },
    { path: '/login', component: () => import('@/views/Login.vue') },

  ],

})


export default router
